﻿@model HtmlContent.Models.Page

@{
    ViewBag.Title = "Page Details";
    List<HtmlContent.Models.Permission> plist = ViewBag.PermissionList;
    List<Core.NameId> lYesNo = Core.Tools.YesNo();
}

<h1>@ViewBag.Title</h1>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(false)
    <table border="0" cellpadding="5" cellspacing="0" width="100%">
    <tr><td valign="top">
    <fieldset>
        <legend>Page Info</legend>
        @Html.HiddenFor(model => model.PageId)
        @Html.HiddenFor(model => model.BusinessUnitId)
        @Html.HiddenFor(model => model.ContainerId)
        @Html.HiddenFor(model => model.HtmlPageId)
        @Html.HiddenFor(model => model.HtmlContentId)

        <div class="display-label">
            @Html.LabelFor(model => model.Title)
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.Title, new { size="50"})
        </div>

        <div style="float:left">
        <div class="display-label">
            @Html.LabelFor(model => model.ShowTitleYN)
        </div>
        <div class="display-field">
            @Core.Tools.YesNo(Model.ShowTitleYN)
        </div>
        </div>

        <div style="float:left;padding-left:20px">
        <div class="display-label">
            @Html.LabelFor(model => model.OnMainMenuYN)
        </div>
        <div class="display-field">
            @Core.Tools.YesNo(Model.OnMainMenuYN)
        </div>
        </div>
        <div style="clear:left" />

        <div class="display-label">
            @Html.LabelFor(model => model.PermissionId)
        </div>
        <div class="display-field">
            @ViewBag.PermissionName
        </div>

        <div class="display-label">
            @Html.LabelFor(model => model.PageName)
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.PageName, new { size="50"})
        </div>
    </fieldset>
    </td><td valign="top">
    <fieldset>
    <legend>Meta Information</legend>

        <div class="display-label">
            @Html.LabelFor(model => model.MetaKeywords)
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.MetaKeywords, new { rows = "4", cols = "35" })
        </div>

        <div class="display-label">
            @Html.LabelFor(model => model.MetaDescription)
        </div>
        <div class="display-field">
            @Html.DisplayFor(model => model.MetaDescription, new { rows="4", cols="35"})
        </div>
    </fieldset>
    </td></tr>    
    <tr><td colspan="2">
        <div class="display-field" id="ContentEditor">
            @Html.Raw(Model.ContentText)
        </div>
    </td></tr>
    <tr><td colspan="2">
    &nbsp;
    </td></tr>
    <tr><td colspan="2">
        @Html.ActionLink("Edit","Edit",new{id=Model.HtmlPageId}) |
        @Html.ActionLink("Back to List", "Index")
    </td></tr>
    </table>
}
